package com.redhipps.hips.client.widget;

import com.google.gwt.user.client.ui.MenuBar;
import com.redhipps.hips.client.command.CreateDoctorCommand;
import com.redhipps.hips.client.command.CreateInstitutionCommand;
import com.redhipps.hips.client.command.CreateScheduleCommand;
import com.redhipps.hips.client.command.InstitutionDetailsCommand;
import com.redhipps.hips.client.command.ListInstitutionsCommand;

public class MenuBarBuilder {

  public MenuBar create() {
    MenuBar bar = new MenuBar();
    MenuBar createMenu = new MenuBar(true);
    createMenu.addItem("New Institution", new CreateInstitutionCommand());
    createMenu.addItem("New Doctor", new CreateDoctorCommand());
    createMenu.addItem("New Schedule", new CreateScheduleCommand());
    bar.addItem("Create", createMenu);
    MenuBar listMenu = new MenuBar(true);
    listMenu.addItem("Institutions", new ListInstitutionsCommand());
    listMenu.addItem("Doctors and Schedules", new InstitutionDetailsCommand());
    bar.addItem("List", listMenu);
    return bar;
  }

}
